package com.hrm.pojo;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "t_zhaopin")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Zhaopin {
	private String id;
	private String position;
	private String qudao;
	private String requirenum;
	private String content;
	private String begindate;
	private String enddate;
	private String beizhu;
	private List<Depart> requiredepartList;
	private List<Interview> interviewList;
	
	@Id
	@GenericGenerator(name = "pk",strategy = "uuid")
	@GeneratedValue(generator = "pk")
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getPosition() {
		return position;
	}
	public void setPosition(String position) {
		this.position = position;
	}
	public String getQudao() {
		return qudao;
	}
	public void setQudao(String qudao) {
		this.qudao = qudao;
	}
	public String getRequirenum() {
		return requirenum;
	}
	public void setRequirenum(String requirenum) {
		this.requirenum = requirenum;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getBegindate() {
		return begindate;
	}
	public void setBegindate(String begindate) {
		this.begindate = begindate;
	}
	public String getEnddate() {
		return enddate;
	}
	public void setEnddate(String enddate) {
		this.enddate = enddate;
	}
	public String getBeizhu() {
		return beizhu;
	}
	public void setBeizhu(String beizhu) {
		this.beizhu = beizhu;
	}
	
	@ManyToMany
	@JoinTable(name = "t_depart_zhaopin",joinColumns = @JoinColumn(name = "departid"),inverseJoinColumns = @JoinColumn(name = "zhaopinid"))
	public List<Depart> getRequiredepartList() {
		return requiredepartList;
	}
	public void setRequiredepartList(List<Depart> requiredepartList) {
		this.requiredepartList = requiredepartList;
	}
	@OneToMany(mappedBy = "zhaopin")
	public List<Interview> getInterviewList() {
		return interviewList;
	}
	public void setInterviewList(List<Interview> interviewList) {
		this.interviewList = interviewList;
	}
	
	
	
}
